package cn.develop.server.api;

import cn.develop.server.commons.ResVO;
import cn.develop.server.service.AnalyzingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author  1.
 * @version 1.0
 * @description:  用户行为解析服务接口
 * @date 2024/2/28 23:24
 */
@RestController
@RequestMapping("/committed")
public class BehaviorResolutionApi {

    @Autowired
    private AnalyzingService parserService;


    /*
    *  TODO   -  日志配置
    *          -  切面类配置
    *          -  写技术文章
    * */
    @PostMapping("/togo")
    public ResVO parseAndGetReport(@RequestParam("targetFiles") MultipartFile[] files) throws IOException {
        return parserService.parsedTargetFiles(files);
    }
}


/*
*
*  TODO
*       1. 前端优化
*       2. 后端优化
*
* */